1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method. More specifically, the present invention relates to a method for tracking an object by using an image.
2. Description of the Related Art
A conventional method for tracking an arbitrary object uses a pattern matching method, which searches for an area having a high degree of matching with a previously stored template image. In addition, a conventional object tracking method uses a relative difference method, in which template images are serially updated and the location of an object is identified based on a difference between a current frame and a previous frame. Furthermore, a conventional object tracking method uses a histogram matching method, in which the location of an object is identified based on the result of a search for an area having a high degree of matching with a color or luminance histogram of the object.
If the above-described pattern matching method is used, a still object can be searched with a high degree of accuracy. However, the performance of tracking a moving object when the pattern matching method is used is not good. More specifically, if the distance between an object and a tracking apparatus varies, if an object rotates, or if the orientation of the tracking apparatus itself varies, the pattern matching method cannot track the object with a high degree of accuracy.
If the above-described relative difference method is used, if another object moves in front of a tracking target object or if the tracking target object has gone out of the scope of imaging, then the tracking target object may not be tracked appropriately.
If the histogram matching method is used, a moving tracking target object can be tracked but the performance of identifying the tracking target object is low if the identification is executed based on a color or luminance histogram only. Furthermore, the tracking performance of the histogram matching method is not sufficiently good if similar colors or areas having approximately the same level of luminance are largely distributed in the background of an object.
In order to improve the tracking performance when various tracking methods are used, Japanese Patent Application Laid-Open No. 2004-348273 discusses a histogram matching method for generating a histogram of a reference area and a histogram of an extended reference area, which is provided separately from the reference area, and executing tracking based on the histograms. More specifically, the method discussed in Japanese Patent Application Laid-Open No. 2004-348273 generates a histogram of a reference area, such as an area around the face of a person, and another histogram of an extended reference area, such as an area around the neck of the person.
However, if the method discussed in Japanese Patent Application Laid-Open No. 2004-348273 is used, it is necessary to set two areas that are independent of each other, i.e., a reference area and an extended reference area, as areas whose histograms are to be generated. Accordingly, if the object is hidden behind something in the extended reference area, the tracking performance may be degraded.